import numpy as np
import pandas as pd
from pandas import Series,DataFrame

data = Series(np.random.randn(10), index=[['a', 'a', 'a', 'b', 'b', 'b', 'c', 'c', 'd', 'd'],
                                          [1,2,3,1,2,3,1,2,2,3]
                                          ])

print data
print data.index
print data['b']
print data['b':'c']
print data.ix[['b', 'd']]
print data[:,2]
print data.unstack()
print data.unstack().stack()